05bf4402e73449737ba5093b3fc1e9e7e50752cb,Common/Frameworks/ERDirectToWeb/Sources/er/directtoweb/ERD2WQueryToOneRelationship.java,ERD2WQueryToOneRelationship,restrictedChoiceList,#,18
Before Change
public Object restrictedChoiceList() {
String restrictedChoiceKey=(String)d2wContext().valueForKey("restrictedChoiceKey");
return restrictedChoiceKey!=null && restrictedChoiceKey.length()>0 ? valueForKeyPath(restrictedChoiceKey) : null;
}
}
After Change
public Object restrictedChoiceList() {
String restrictedChoiceKey=(String)d2wContext().valueForKey("restrictedChoiceKey");
if( restrictedChoiceKey!=null && restrictedChoiceKey.length()>0 )
return valueForKeyPath(restrictedChoiceKey);
String fetchSpecName=(String)d2wContext().valueForKey("restrictingFetchSpecification");
if(fetchSpecName != null) {
EOEditingContext ec = ERXExtensions.newEditingContext();
EOEntity entity = d2wContext().entity();
EORelationship relationship = entity.relationshipNamed((String)d2wContext().valueForKey("propertyKey"));
return EOUtilities.objectsWithFetchSpecificationAndBindings(ec, relationship.destinationEntity().name(),fetchSpecName,null);
}
return null;
}
}